package com.wulin.wucut.service.impl;

import com.wulin.wucut.domain.entity.draft.content.DraftContent;
import com.wulin.wucut.properties.JianYinDraftProperties;
import com.wulin.wucut.service.FileService;
import com.wulin.wucut.service.MaterialService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.bytedeco.javacv.FrameGrabber;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RequiredArgsConstructor
public class MaterialServiceImpl implements MaterialService {
//    @Value("${jianyin.import.file}")
//    private String importFile;
    private final FileService fileService;
    private final JianYinDraftProperties jianYinDraftProperties;
    
    @Override
    public void importMaterial() {
//        List<String> fileNames = FileUtil.listFileNames(importFile);
//        DraftMetaInfo metaInfo = new DraftMetaInfo();
//        //创建素材
//        List<DraftMaterialsValue> list = fileNames.stream().map(t -> {
//            String fullPath = importFile + JianYinUtil.PATH_SPLIT + t;
//            DraftMaterialsValue draftMaterialsValue = new DraftMaterialsValue();
//            draftMaterialsValue.setFilePath(fullPath);
//            return draftMaterialsValue;
//        }).collect(Collectors.toList());
//        metaInfo.appendMaterialType0(list);
    }

    @Override
    public DraftContent importVideo(String path) throws FrameGrabber.Exception {
        return null;
    }

    @Override
    public DraftContent importSegment(DraftContent draftContent) {
       
        return null;
    }


}
